﻿@model EnterpriseFund.Model.DJ_NSRXX
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)


<script>

    $(document).ready(function () {
        lpModal.Hide();
        $("#toolMenu").smartFloat();
        $("#tabs").tabs();
        if ($("#hidNSRBM").val() != null && $("#hidNSRBM").val() != '' && $("#hidBeginDate").val() != null && $("#hidBeginDate").val() != '' && $("#hidEndDate").val() != null && $("#hidEndDate").val() != '') {
            document.getElementById("tabs").style.visibility = "visible";
        }
        else {
            document.getElementById("tabs").style.visibility = "hidden";
        }
        var hdjsAlert = $("#hdjsAlert").val(); 
        if (hdjsAlert != "") {
            alert(hdjsAlert);
        }
//        if (hdjsAlert == "操作成功") {
//            window.location.href = rootPath + '/TaxAuditForm/';
//        }
        ////             Html.Hidden("hidNSRBM", ViewData["NSRBM"])
        ////        Html.Hidden("hidBeginDate", ViewData["beginDate"])
        ////        Html.Hidden("hidEndDate", ViewData["endDate"])

        //"Url.Action("TaxAuditFormShowDate", "TaxAuditForm", new { NSRBM = ViewData["NSRBM"], beginDate = ViewData["beginDate"], endDate = ViewData["endDate"] })"
        //"Url.Action("TaxAuditAdjustIndex", "TaxAuditForm", new {  beginDate = ViewData["beginDate"] })"
        $("#contentleft").attr("src", rootPath + '/TaxAuditForm/TaxAuditFormShowDate?NSRBM=' + $("#hidNSRBM").val() + '&beginDate=' + $("#hidBeginDate").val() + '&endDate=' + $("#hidEndDate").val());
        $("#contentleft2").attr("src", rootPath + '/TaxAuditForm/TaxAuditAdjustIndex?beginDate=' + $("#hidBeginDate").val());
    });
</script>
    <script type="text/javascript">


        function search() {
            if (BeginDate.GetDate() == null) {
                alert("开始时间必须录入");
                return;
            }
            if (EndDate.GetDate() == null) {
                alert("结束时间必须录入");
                return;
            }
            if (NSRBMQ.GetText() == "") {
                alert("纳税人编码必须录入");
                return;
            }
            window.location.href = rootPath + '/TaxAuditForm/TaxAuditFormAdd?NSRBM=' + NSRBMQ.GetText() + '&beginDate=' + BeginDate.GetText() + '&endDate=' + EndDate.GetText();
        }

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnAdd":
                    {
                        lpModal.Show();
                        //增加
                        $("#hidFStatus").val("open");
                        if (ASPxClientComboBox.Cast("FAllowanceClassNo").GetValue() != null && ASPxClientComboBox.Cast("FAllowanceClassNo").GetValue() != '') {
                            form1.submit();
                        }
                        else {
                            alert("请选择补贴方式");
                            lpModal.Hide();
                        }
                        break;
                    }
                case "btnSave":
                    {
                        lpModal.Show();
                        //增加
                        $("#hidFStatus").val("Save");
                        if (ASPxClientComboBox.Cast("FAllowanceClassNo").GetValue() != null && ASPxClientComboBox.Cast("FAllowanceClassNo").GetValue() != '') {
                            form1.submit();
                        }
                        else {
                            alert("请选择补贴方式");
                            lpModal.Hide();
                        }
                        break;
                    }
                case "btnPrint":
                    {
                        if ($("#hidNSRBM").val() != "") {
                            window.showModalDialog(rootPath + '/TaxAuditForm/TaxAuditFormPrint?NSRBM=' + $("#hidNSRBM").val() + '&beginDate=' + $("#hidBeginDate").val() + '&endDate=' + $("#hidEndDate").val(), "", "dialogWidth=800px;dialogHeight=500px");
                            // window.location.href = rootPath + '/TaxAuditForm/TaxAuditFormPrint?NSRBM=' + $("#hidNSRBM").val() + '&beginDate=' + $("#hidBeginDate").val() + '&endDate=' + $("#hidEndDate").val();
                        }
                        break;
                    }
                case "btnback":
                    {
                        window.location.href = rootPath + '/TaxAuditForm/';
                    }
            }

        }


        function taxListR() {
           contentleft.gvTaxAudit_SB_ZSXX.Refresh();
        }
    </script>

</head>
<body>
    @using (Html.BeginForm("TaxAuditFormSave", "TaxAuditForm", FormMethod.Post, new { id = "form1" }))
    {
   @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnAdd";
           item.Text = "发送";
           item.Image.Url = Url.Content("~/Content/ControlImages/edit_add.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnPrint";
           item.Text = "打印申报表";
           item.Image.Url = Url.Content("~/Content/ControlImages/print.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnback";
           item.Text = "返回";
           item.Image.Url = Url.Content("~/Content/ControlImages/back.png");
       });
       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
       
    <table align="center" class="tableForm">
        <tr>
            <td style=" width:150px; text-align:right; vertical-align:middle"  class="tdClass">
               纳税人编码:</td>
            <td style="text-align:left; vertical-align:middle"  class="tdClass">
           @Html.DevExpress().TextBox(settings =>
      {
          settings.Name = "NSRBMQ";
          settings.Width = 150;
          settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
          settings.Properties.ValidationSettings.EnableCustomValidation = true;
      }).GetHtml()
            </td>
         <td style=" width:100px; text-align:right; vertical-align:middle"  class="tdClass">
                入库时间:</td>
            <td>
                <table>
                <tr>
                <td  class="tdClass">
                @Html.DevExpress().DateEdit(settings =>
           {
               settings.Name = "BeginDate";
               settings.Properties.ShowShadow = true;
               settings.Width = 100;
               if (ViewData["beginDate"] != null && ViewData["beginDate"].ToString()!="")
               {
                   settings.Date = DateTime.Parse(ViewData["beginDate"].ToString());
               }
               settings.Properties.EditFormat = EditFormat.Date;
               settings.Properties.EditFormatString = "yyyy-MM-dd";
               settings.Properties.MinDate = DateTime.Parse("1900-01-01");
               settings.Properties.UseMaskBehavior = true;
            
           }).GetHtml()
                </td>
                
                    <td>     -
                </td>
                    <td>
              @Html.DevExpress().DateEdit(settings =>
                {
                    settings.Name = "EndDate";
                    settings.Properties.ShowShadow = true;
                    settings.Width = 100;
                    if (ViewData["endDate"] != null && ViewData["endDate"].ToString() != "")
                    {
                        settings.Date = DateTime.Parse(ViewData["endDate"].ToString());
                    }
                    settings.Properties.EditFormat = EditFormat.Date;
                    settings.Properties.MinDate = DateTime.Parse("1900-01-01");
                    settings.Properties.EditFormatString = "yyyy-MM-dd";
                    settings.Properties.UseMaskBehavior = true;
                    
                }).GetHtml()
                </td>
                </tr>
                </table>
            </td>
            <td>
             @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnSearch";
                settings.Text = "查询";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                settings.ClientSideEvents.Click = "search";
            }).GetHtml()

        @*     @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnUndo";
                settings.Text = "重置";
                settings.ControlStyle.CssClass = "button";
                settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                settings.ClientSideEvents.Click = "undo";
            }).GetHtml()*@

            </td>
        </tr>
    </table>
    <br />
    <table align="center" class="tableForm">
    <tr>
     <Td align="right" style=" width:150px" class="tdClass">
     纳税人编码：
    </Td>
     <Td class="tdClass">
      @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "NSRBM";
     settings.Text = Model.NSRBM;
     settings.Enabled = false;
     settings.Width = 300;
     settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
    </Td>
     <Td align="right" style=" width:150px" class="tdClass">
     企业类别：
    </Td>
     <Td class="tdClass">
      @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "FEnterprisePropName";
     settings.Text = Model.FEnterprisePropName;
     settings.Enabled = false;
     settings.Width = 300;
     settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
    </Td>
    </tr>
      <tr>
     <Td align="right" style=" width:150px" class="tdClass">
     纳税人名称：
    </Td>
     <Td class="tdClass">
      @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "NSRMC";
     settings.Text = Model.NSRMC;
     settings.Enabled = false;
     settings.Width = 300;
     settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
    </Td>
      <Td align="right" style=" width:150px" class="tdClass">
     资金项目：
    </Td>
     <Td class="tdClass">
      @Html.DevExpress().TextBox(settings =>
 {
     settings.Name = "FFinancePropName";
     settings.Text = Model.FFinancePropName;
     settings.Enabled = false;
     settings.Width = 300;
     settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
     settings.Properties.ValidationSettings.EnableCustomValidation = true;
 }).GetHtml()
    </Td>
    </tr>
 
        <tr>
     <Td align="right" style=" width:150px" class="tdClass">
     补贴方式：
    </Td>
     <Td class="tdClass">
      @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FAllowanceClassNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = 300;
                   settings.Properties.TextField = "FAllowanceName";
                   settings.Properties.ValueField = "FAllowanceClassNo";
             
               }).BindList(ViewData["AllowanceClassList"]).Bind(ViewData["FAllowanceClassNo"]).GetHtml()
    </Td>
    <td>
    </td>
    <td></td>
    </tr>
    @if (ViewData["ygzbzStr"] != null && ViewData["ygzbzStr"].ToString() != "")
    {
    <tr>
    <td  colspan="2">
   <font Color="red" > @ViewData["ygzbzStr"] </font>
    </td>
    </tr>
    }
    </table>
    <br />
       <div id="tabs" class="div">
            <ul>
                <li><a href="#TaxData">税款数据</a></li>
                <li><a href="#TaxAuditAdjust">调整数据</a></li>
            </ul>
            <div id="TaxData" style="height: 550px">
            <iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0'></iframe>
            </div>
            <div id="TaxAuditAdjust" style="height: 550px">
            <iframe  id='contentleft2' name='contentleft2' style='width:100%;height:100%' frameborder='0' ></iframe>
            </div>
        </div> 

        @Html.Hidden("hidType", ViewData["type"])
        @Html.Hidden("hidFStatus", "")
        @Html.Hidden("hidNSRBM", ViewData["NSRBM"])
        @Html.Hidden("hidBeginDate", ViewData["beginDate"])
        @Html.Hidden("hidEndDate", ViewData["endDate"])
         @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));
    }
 @*@Html.DevExpress().PageControl(
    settings =>
    {
        settings.Name = "tabCtlGroup";
        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
        //settings.Height = System.Web.UI.WebControls.Unit.Pixel(600);
        settings.Styles.Content.Border.BorderWidth = 0;
        settings.TabPages.Add("税款数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditFormShowDate", "TaxAuditForm", new { NSRBM = ViewData["NSRBM"], beginDate = ViewData["beginDate"], endDate = ViewData["endDate"] }) + "'></iframe>");
        settings.TabPages.Add("调整数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditAdjustIndex", "TaxAuditForm") + "'></iframe>");
    }).GetHtml()
*@
    <script>
        lp.Hide();
    </script>

</body>
</html>
